3.8.94 \(\int \frac {a+b x+c x^2}{\sqrt {1-d x} \sqrt {1+d x}} \, dx\) [794]

Optimal. Leaf size=63 \[ -\frac {b \sqrt {1-d^2 x^2}}{d^2}-\frac {c x \sqrt {1-d^2 x^2}}{2 d^2}+\frac {\left (c+2 a d^2\right ) \sin ^{-1}(d x)}{2 d^3} \]

[Out]

1/2*(2*a*d^2+c)*arcsin(d*x)/d^3-b*(-d^2*x^2+1)^(1/2)/d^2-1/2*c*x*(-d^2*x^2+1)^(1/2)/d^2

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 63, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 30, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {913, 1829, 655, 222} \begin {gather*} \frac {\left (2 a d^2+c\right ) \text {ArcSin}(d x)}{2 d^3}-\frac {b \sqrt {1-d^2 x^2}}{d^2}-\frac {c x \sqrt {1-d^2 x^2}}{2 d^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*x + c*x^2)/(Sqrt[1 - d*x]*Sqrt[1 + d*x]),x]

[Out]

-((b*Sqrt[1 - d^2*x^2])/d^2) - (c*x*Sqrt[1 - d^2*x^2])/(2*d^2) + ((c + 2*a*d^2)*ArcSin[d*x])/(2*d^3)

Rule 222

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSin[Rt[-b, 2]*(x/Sqrt[a])]/Rt[-b, 2], x] /; FreeQ[{a, b}
, x] && GtQ[a, 0] && NegQ[b]

Rule 655

Int[((d_) + (e_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[e*((a + c*x^2)^(p + 1)/(2*c*(p + 1))),
x] + Dist[d, Int[(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, p}, x] && NeQ[p, -1]

Rule 913

Int[((d_) + (e_.)*(x_))^(m_)*((f_) + (g_.)*(x_))^(n_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :>
Int[(d*f + e*g*x^2)^m*(a + b*x + c*x^2)^p, x] /; FreeQ[{a, b, c, d, e, f, g, m, n, p}, x] && EqQ[m - n, 0] &&
EqQ[e*f + d*g, 0] && (IntegerQ[m] || (GtQ[d, 0] && GtQ[f, 0]))

Rule 1829

Int[(Pq_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> With[{q = Expon[Pq, x], e = Coeff[Pq, x, Expon[Pq, x]]}, Si
mp[e*x^(q - 1)*((a + b*x^2)^(p + 1)/(b*(q + 2*p + 1))), x] + Dist[1/(b*(q + 2*p + 1)), Int[(a + b*x^2)^p*Expan
dToSum[b*(q + 2*p + 1)*Pq - a*e*(q - 1)*x^(q - 2) - b*e*(q + 2*p + 1)*x^q, x], x], x]] /; FreeQ[{a, b, p}, x]
&& PolyQ[Pq, x] &&  !LeQ[p, -1]

Rubi steps

\begin {align*} \int \frac {a+b x+c x^2}{\sqrt {1-d x} \sqrt {1+d x}} \, dx &=\int \frac {a+b x+c x^2}{\sqrt {1-d^2 x^2}} \, dx\\ &=-\frac {c x \sqrt {1-d^2 x^2}}{2 d^2}-\frac {\int \frac {-c-2 a d^2-2 b d^2 x}{\sqrt {1-d^2 x^2}} \, dx}{2 d^2}\\ &=-\frac {b \sqrt {1-d^2 x^2}}{d^2}-\frac {c x \sqrt {1-d^2 x^2}}{2 d^2}-\frac {\left (-c-2 a d^2\right ) \int \frac {1}{\sqrt {1-d^2 x^2}} \, dx}{2 d^2}\\ &=-\frac {b \sqrt {1-d^2 x^2}}{d^2}-\frac {c x \sqrt {1-d^2 x^2}}{2 d^2}+\frac {\left (c+2 a d^2\right ) \sin ^{-1}(d x)}{2 d^3}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.24, size = 82, normalized size = 1.30 \begin {gather*} \frac {(-2 b-c x) \sqrt {1-d^2 x^2}}{2 d^2}+\frac {\sqrt {-d^2} \left (c+2 a d^2\right ) \log \left (-\sqrt {-d^2} x+\sqrt {1-d^2 x^2}\right )}{2 d^4} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*x + c*x^2)/(Sqrt[1 - d*x]*Sqrt[1 + d*x]),x]

[Out]

((-2*b - c*x)*Sqrt[1 - d^2*x^2])/(2*d^2) + (Sqrt[-d^2]*(c + 2*a*d^2)*Log[-(Sqrt[-d^2]*x) + Sqrt[1 - d^2*x^2]])
/(2*d^4)

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 3.
time = 0.13, size = 117, normalized size = 1.86

method result size
default \(-\frac {\sqrt {-d x +1}\, \sqrt {d x +1}\, \left (\mathrm {csgn}\left (d \right ) d \sqrt {-d^{2} x^{2}+1}\, c x -2 \arctan \left (\frac {\mathrm {csgn}\left (d \right ) d x}{\sqrt {-d^{2} x^{2}+1}}\right ) a \,d^{2}+2 \,\mathrm {csgn}\left (d \right ) d \sqrt {-d^{2} x^{2}+1}\, b -\arctan \left (\frac {\mathrm {csgn}\left (d \right ) d x}{\sqrt {-d^{2} x^{2}+1}}\right ) c \right ) \mathrm {csgn}\left (d \right )}{2 d^{3} \sqrt {-d^{2} x^{2}+1}}\) \(117\)
risch \(\frac {\left (c x +2 b \right ) \left (d x -1\right ) \sqrt {d x +1}\, \sqrt {\left (-d x +1\right ) \left (d x +1\right )}}{2 d^{2} \sqrt {-\left (d x -1\right ) \left (d x +1\right )}\, \sqrt {-d x +1}}+\frac {\left (\frac {\arctan \left (\frac {\sqrt {d^{2}}\, x}{\sqrt {-d^{2} x^{2}+1}}\right ) a}{\sqrt {d^{2}}}+\frac {\arctan \left (\frac {\sqrt {d^{2}}\, x}{\sqrt {-d^{2} x^{2}+1}}\right ) c}{2 d^{2} \sqrt {d^{2}}}\right ) \sqrt {\left (-d x +1\right ) \left (d x +1\right )}}{\sqrt {-d x +1}\, \sqrt {d x +1}}\) \(151\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c*x^2+b*x+a)/(-d*x+1)^(1/2)/(d*x+1)^(1/2),x,method=_RETURNVERBOSE)

[Out]

-1/2*(-d*x+1)^(1/2)*(d*x+1)^(1/2)/d^3*(csgn(d)*d*(-d^2*x^2+1)^(1/2)*c*x-2*arctan(csgn(d)*d*x/(-d^2*x^2+1)^(1/2
))*a*d^2+2*csgn(d)*d*(-d^2*x^2+1)^(1/2)*b-arctan(csgn(d)*d*x/(-d^2*x^2+1)^(1/2))*c)/(-d^2*x^2+1)^(1/2)*csgn(d)

________________________________________________________________________________________

Maxima [A]
time = 0.49, size = 57, normalized size = 0.90 \begin {gather*} \frac {a \arcsin \left (d x\right )}{d} - \frac {\sqrt {-d^{2} x^{2} + 1} c x}{2 \, d^{2}} - \frac {\sqrt {-d^{2} x^{2} + 1} b}{d^{2}} + \frac {c \arcsin \left (d x\right )}{2 \, d^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*x^2+b*x+a)/(-d*x+1)^(1/2)/(d*x+1)^(1/2),x, algorithm="maxima")

[Out]

a*arcsin(d*x)/d - 1/2*sqrt(-d^2*x^2 + 1)*c*x/d^2 - sqrt(-d^2*x^2 + 1)*b/d^2 + 1/2*c*arcsin(d*x)/d^3

________________________________________________________________________________________

Fricas [A]
time = 2.20, size = 67, normalized size = 1.06 \begin {gather*} -\frac {{\left (c d x + 2 \, b d\right )} \sqrt {d x + 1} \sqrt {-d x + 1} + 2 \, {\left (2 \, a d^{2} + c\right )} \arctan \left (\frac {\sqrt {d x + 1} \sqrt {-d x + 1} - 1}{d x}\right )}{2 \, d^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*x^2+b*x+a)/(-d*x+1)^(1/2)/(d*x+1)^(1/2),x, algorithm="fricas")

[Out]

-1/2*((c*d*x + 2*b*d)*sqrt(d*x + 1)*sqrt(-d*x + 1) + 2*(2*a*d^2 + c)*arctan((sqrt(d*x + 1)*sqrt(-d*x + 1) - 1)
/(d*x)))/d^3

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*x**2+b*x+a)/(-d*x+1)**(1/2)/(d*x+1)**(1/2),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]
time = 5.60, size = 60, normalized size = 0.95 \begin {gather*} -\frac {{\left ({\left (d x + 1\right )} c + 2 \, b d - c\right )} \sqrt {d x + 1} \sqrt {-d x + 1} - 2 \, {\left (2 \, a d^{2} + c\right )} \arcsin \left (\frac {1}{2} \, \sqrt {2} \sqrt {d x + 1}\right )}{2 \, d^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*x^2+b*x+a)/(-d*x+1)^(1/2)/(d*x+1)^(1/2),x, algorithm="giac")

[Out]

-1/2*(((d*x + 1)*c + 2*b*d - c)*sqrt(d*x + 1)*sqrt(-d*x + 1) - 2*(2*a*d^2 + c)*arcsin(1/2*sqrt(2)*sqrt(d*x + 1
)))/d^3

________________________________________________________________________________________

Mupad [B]
time = 7.76, size = 232, normalized size = 3.68 \begin {gather*} -\frac {\sqrt {1-d\,x}\,\left (\frac {b}{d^2}+\frac {b\,x}{d}\right )}{\sqrt {d\,x+1}}-\frac {4\,a\,\mathrm {atan}\left (\frac {d\,\left (\sqrt {1-d\,x}-1\right )}{\left (\sqrt {d\,x+1}-1\right )\,\sqrt {d^2}}\right )}{\sqrt {d^2}}-\frac {2\,c\,\mathrm {atan}\left (\frac {\sqrt {1-d\,x}-1}{\sqrt {d\,x+1}-1}\right )}{d^3}-\frac {\frac {14\,c\,{\left (\sqrt {1-d\,x}-1\right )}^3}{{\left (\sqrt {d\,x+1}-1\right )}^3}-\frac {14\,c\,{\left (\sqrt {1-d\,x}-1\right )}^5}{{\left (\sqrt {d\,x+1}-1\right )}^5}+\frac {2\,c\,{\left (\sqrt {1-d\,x}-1\right )}^7}{{\left (\sqrt {d\,x+1}-1\right )}^7}-\frac {2\,c\,\left (\sqrt {1-d\,x}-1\right )}{\sqrt {d\,x+1}-1}}{d^3\,{\left (\frac {{\left (\sqrt {1-d\,x}-1\right )}^2}{{\left (\sqrt {d\,x+1}-1\right )}^2}+1\right )}^4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*x + c*x^2)/((1 - d*x)^(1/2)*(d*x + 1)^(1/2)),x)

[Out]

- ((1 - d*x)^(1/2)*(b/d^2 + (b*x)/d))/(d*x + 1)^(1/2) - (4*a*atan((d*((1 - d*x)^(1/2) - 1))/(((d*x + 1)^(1/2)
- 1)*(d^2)^(1/2))))/(d^2)^(1/2) - (2*c*atan(((1 - d*x)^(1/2) - 1)/((d*x + 1)^(1/2) - 1)))/d^3 - ((14*c*((1 - d
*x)^(1/2) - 1)^3)/((d*x + 1)^(1/2) - 1)^3 - (14*c*((1 - d*x)^(1/2) - 1)^5)/((d*x + 1)^(1/2) - 1)^5 + (2*c*((1
- d*x)^(1/2) - 1)^7)/((d*x + 1)^(1/2) - 1)^7 - (2*c*((1 - d*x)^(1/2) - 1))/((d*x + 1)^(1/2) - 1))/(d^3*(((1 -
d*x)^(1/2) - 1)^2/((d*x + 1)^(1/2) - 1)^2 + 1)^4)

________________________________________________________________________________________